org.eclipse.vtp.framework.engine.runtime
Class Action

java.lang.Object
  extended by org.eclipse.vtp.framework.engine.runtime.Component
      extended by org.eclipse.vtp.framework.engine.runtime.Configurable
          extended by org.eclipse.vtp.framework.engine.runtime.Executable
              extended by org.eclipse.vtp.framework.engine.runtime.Action

public class Action
extends Executable

Represents an action that can be run by the engine.

Author:
Lonnie Pryor

Field Summary
 
Fields inherited from class org.eclipse.vtp.framework.engine.runtime.Component
blueprint, constructors, mutators
 
Constructor Summary
Action(Blueprint blueprint, java.lang.String name, org.w3c.dom.Element[] elements, java.lang.String instanceID, ActionDescriptor descriptor)
          Creates a new Action.
 
Method Summary
 void configure(java.lang.String resultID, Executable next)
          Configures an available result of this action.
 Executable execute(Sequence sequence)
          Creates and executes an instance of this executable.
 Action getActionInstance()
          Returns the ID of the action instance that owns this executable.
 int getActionState()
          Returns the action state this executable runs in.
protected  java.lang.Class getComponentType()
           
 java.lang.String getName()
          Returns the name of the action.
 boolean isBlocking()
          Returns true if this execution is blocking.
 
Methods inherited from class org.eclipse.vtp.framework.engine.runtime.Executable
createInstance, createServiceRegistry, getInstanceID
 
Methods inherited from class org.eclipse.vtp.framework.engine.runtime.Configurable
createBuilder, lookupAllConfigurations, lookupConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Action

public Action(Blueprint blueprint,
              java.lang.String name,
              org.w3c.dom.Element[] elements,
              java.lang.String instanceID,
              ActionDescriptor descriptor)
       throws java.lang.NullPointerException
Creates a new Action.

Parameters:
blueprint - The blueprint of the process.
name - The name of the action.
elements - The configuration data or null for no configuration data.
instanceID - The ID of this instance of the action.
descriptor - The descriptor of the action.
Throws:
java.lang.NullPointerException - If the supplied blueprint is null.
java.lang.NullPointerException - If the supplied instance ID is null.
java.lang.NullPointerException - If the supplied descriptor is null.
Method Detail

configure

public void configure(java.lang.String resultID,
                      Executable next)
Configures an available result of this action.

Parameters:
resultID - The ID of the result path to configure.
next - The next executable in the path.

getName

public java.lang.String getName()
Returns the name of the action.

Returns:
The name of the action.

getActionInstance

public Action getActionInstance()
Description copied from class: Executable
Returns the ID of the action instance that owns this executable.

Specified by:
getActionInstance in class Executable
Returns:
The ID of the action instance that owns this executable.

getActionState

public int getActionState()
Description copied from class: Executable
Returns the action state this executable runs in.

Specified by:
getActionState in class Executable
Returns:
The action state this executable runs in.

isBlocking

public boolean isBlocking()
Description copied from class: Executable
Returns true if this execution is blocking.

Specified by:
isBlocking in class Executable
Returns:
True if this execution is blocking.

execute

public Executable execute(Sequence sequence)
Description copied from class: Executable
Creates and executes an instance of this executable.

Specified by:
execute in class Executable
Parameters:
sequence - The sequence to create under.
Returns:
The next executable in the process or null if the process is over.

getComponentType

protected java.lang.Class getComponentType()